package com.zhouxiao.multithreading.forkjoin;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask;


public class ForkJoinTest {
    public static void main(String[] args) throws ExecutionException, InterruptedException {

        ForkJoinPool pool = new ForkJoinPool();
        Counter counter = new Counter(1, 100);
        ForkJoinTask<Integer> submit = pool.submit(counter);
        System.out.println(submit.get());

    }
}